import React, {Component} from "react";
import {inject, observer} from "mobx-react";
import {action} from "mobx";

@inject("activityStore")
@observer
class SelectActivityType extends Component {
    constructor(props) {
        super(props);
    }

    @action selectNor = () => {
        this.props.activityStore.setActivityType(0);
    };
    @action selectYear = () => {
        this.props.activityStore.setActivityType(1);
    };

    render() {
        return (
            <div>
                <div>
                    <button onClick={this.selectYear}>查看值年活动</button>
                </div>
                <div>
                    <button onClick={this.selectNor}>查看普通活动</button>
                </div>
            </div>
        );
    };
}

export default SelectActivityType;
